#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Action.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class InputPin;
class OutputPin;

/// <summary>
/// TestIdentityAction
/// A TestIdentityAction is an Action that tests if two values are identical
/// objects.
/// </summary>
class UMLMODEL_EXPORT TestIdentityAction : public Action {

public: // Constructors and destructors
    explicit TestIdentityAction(const QString& umlType="uml::TestIdentityAction");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// first getter
    /// The InputPin on which the first input object is placed.
    /// </summary>
    shared_ptr<InputPin> first() const;

    /// <summary>
    /// first setter
    /// The InputPin on which the first input object is placed.
    /// </summary>
    void setFirst(shared_ptr<InputPin> value);

    /// <summary>
    /// result getter
    /// The OutputPin whose Boolean value indicates whether the two input objects are
    /// identical.
    /// </summary>
    shared_ptr<OutputPin> result() const;

    /// <summary>
    /// result setter
    /// The OutputPin whose Boolean value indicates whether the two input objects are
    /// identical.
    /// </summary>
    void setResult(shared_ptr<OutputPin> value);

    /// <summary>
    /// second getter
    /// The OutputPin on which the second input object is placed.
    /// </summary>
    shared_ptr<InputPin> second() const;

    /// <summary>
    /// second setter
    /// The OutputPin on which the second input object is placed.
    /// </summary>
    void setSecond(shared_ptr<InputPin> value);

private: // Fields
    /// <summary>
    /// first
    /// The InputPin on which the first input object is placed.
    /// </summary>
    shared_ptr<InputPin> first_;

    /// <summary>
    /// result
    /// The OutputPin whose Boolean value indicates whether the two input objects are
    /// identical.
    /// </summary>
    shared_ptr<OutputPin> result_;

    /// <summary>
    /// second
    /// The OutputPin on which the second input object is placed.
    /// </summary>
    shared_ptr<InputPin> second_;

};

} // namespace uml
